package com.jeesite.modules.kj.api.vo.response;

import com.jeesite.modules.kj.api.vo.responseVo.base.BaseResponseVo;
import com.jeesite.modules.kj.entity.KjQuestion;
import com.jeesite.modules.sys.utils.DictUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class QuestionDetailResponseVo extends QuestionResponseVo {
    @ApiModelProperty(value = "问题内容")
    private String content;
    @ApiModelProperty(value = "回复内容")
    private String reply;
    @ApiModelProperty(value = "图片")
    private String imgs;
    @ApiModelProperty(value = "问题类型字符串")
    private String questionTypeStr;



    public QuestionDetailResponseVo() {
    }

    @Override
    public void setEntity(KjQuestion entity) {
        BeanUtils.copyProperties(entity, this);
        this.questionTypeStr = DictUtils.getDictLabel("question_type", this.getQuestionType(), "");
    }

    public QuestionDetailResponseVo(KjQuestion entity) {
        setEntity(entity);
    }
}
